home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / develop / libsrc11.arc / WRBLKSC9.C < prev    next >
C/C++ Source or Header  |  1989-04-27  |  1KB  |  41 lines

  1. /*    wrblksc9.c 4.2        */
  2. /*F****************************************************************************
  3.  
  4. FUNCTION NAME:    wrblksc9
  5.  
  6. ACTION:        Writes count integers to the SCI serial hardware.  The size
  7.         of the array is integer because 9 bits are output to the
  8.         SCI serial hardware.
  9.  
  10. PARAMETERS:
  11.         array:    pointer to an array of integers.  Each element is
  12.             16 bits long, though only the low 9 bits are used.
  13.  
  14.         count:    Number of 9 bit characters to output to the SCI
  15.             serial hardware.
  16.  
  17. RETURNS:    (void)
  18.  
  19. ******************************************************************************/
  20.  
  21. #include <hc11/directives.h>
  22.  
  23. SMALL
  24. void wrblksc9(array, count)
  25.  
  26.     int    *array;        /* pointer to data to be written */
  27.     int    count;        /* number of bytes to be written */
  28.  
  29.     {
  30.  
  31.     /****************************************************************/
  32.     /*    Note that "while ((count--) > 0)" is equivalent to    */
  33.     /*    "while ((--count) >= 0)" but the pre-decrement version    */
  34.     /*    is more efficient than the post-decrement version.    */
  35.     /****************************************************************/
  36.  
  37.     while ((--count) >= 0)
  38.         wrbytsci(*(array++));
  39.  
  40.     }    /* end of wrblksc9    */
  41.